# VERSION 0.1
# Author: stopthink

#基础镜像
FROM tomcat:8.5-jre8

#作者
MAINTAINER stopthink

#定义工作目录
ENV WORK_PATH /usr/local/tomcat

COPY  ./logging.properties $WORK_PATH/conf

COPY  ./setclasspath.sh $WORK_PATH/bin

COPY  ./server.xml $WORK_PATH/conf

#删除原文件server.xml
RUN rm -rf $WORK_PATH/webapps/ROOT \
    && rm -rf $WORK_PATH/webapps/docs \
    && rm -rf $WORK_PATH/webapps/examples \
    && rm -rf $WORK_PATH/webapps/manager \
    && rm -rf $WORK_PATH/webapps/host-manager \
    && mkdir -p /project/properties \
    && mkdir -p /project/config

# 设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone

EXPOSE 8080
